import service from '@/api/index.js';

export const searchAllMenuNode = async (params) => {
  try {
    const res = await service.get('jestic-account-admin/v1/pt/account-admin/system/menu/searchAllMenuNode', { params });
    return res;
  } catch (error) {
    throw error;
  }
};

export const searchMenuList = async (params) => {
  try {
    const res = await service.get('jestic-account-admin/v1/pt/account-admin/system/menu/searchMenuList', { params });
    return res;
  } catch (error) {
    throw error;
  }
};

export const updateMenuStatus = async (params) => {
  try {
    const res = await service.post('jestic-account-admin/v1/pt/account-admin/system/menu/changeMenuStatus', params);
    return res;
  } catch (error) {
    throw error;
  }
};

export const deleteMenuInfo = async (params) => {
  try {
    const res = await service.post('jestic-account-admin/v1/pt/account-admin/system/menu/deleteMenuInfo', params);
    return res;
  } catch (error) {
    throw error;
  }
};